package org.six.ways.spring.test;

import org.six.ways.spring.user.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author Mr.Fu
 * @date 2023/1/14 下午4:58
 */
public class LifeCycle {

    public static void main(String[] args) {
        String[] basePackages = {"org.six.ways.spring"};
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(basePackages);
        UserService userService = applicationContext.getBean(UserService.class);
        System.out.println(userService.getName());
    }
}
